<?php

namespace App\Console\Commands;

use App\Libraries\Payment\KylinCloud\KylinPayment;
use Illuminate\Console\Command;

class TransferCommand extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'transfer';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Testing transactions';

    /**
     * Create a new command instance.
     *
     * @return void
     */
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * Execute the console command.
     *
     * @return int
     */
    public function handle()
    {
        $params = [
            'transAmount' => '0.5', // 最低金额
            'accountType' => "WX_ACCOUNT",
            // 'accountNo' => "o53aaswoUSGZO0JJ6HR5w7jbwsQU", //
            'accountNo' => "ouD4f6_Jc9mpaxsXFOp47hjvV9oc", //
            'outBizNo' => strtoupper(uniqid()),
            'notifyUrl' => "http://wz.baiyiadsense.com/payment/kylin/transfer",
            'remark' => "SC01#生成猪猪的服务费", // SC01#
        ];
        $result = KylinPayment::makeRequest($params);

        dd($result);
    }
}
